package com.ruoyi.xzs.service.impl;

import com.ruoyi.xzs.domain.KnowsQuestion;
import com.ruoyi.xzs.mapper.KnowsQuestionMapper;
import com.ruoyi.xzs.service.IKnowsQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 知识点题目关联Service业务层处理
 * 
 * @author li
 * @date 2023-03-14
 */
@Service
public class KnowsQuestionServiceImpl implements IKnowsQuestionService 
{
    @Autowired
    private KnowsQuestionMapper knowsQuestionMapper;

    /**
     * 查询知识点题目关联
     *
     * @param kId 知识点题目关联主键
     * @return 知识点题目关联
     */
    @Override
    public List<KnowsQuestion> selectKnowsQuestionByKId(Long kId)
    {
        return knowsQuestionMapper.selectKnowsQuestionByKId(kId);
    }

    /**
     * 查询知识点题目关联列表
     * 
     * @param knowsQuestion 知识点题目关联
     * @return 知识点题目关联
     */
    @Override
    public List<KnowsQuestion> selectKnowsQuestionList(KnowsQuestion knowsQuestion)
    {
        return knowsQuestionMapper.selectKnowsQuestionList(knowsQuestion);
    }

    /**
     * 新增知识点题目关联
     * 
     * @param knowsQuestion 知识点题目关联
     * @return 结果
     */
    @Override
    public int insertKnowsQuestion(KnowsQuestion knowsQuestion)
    {
        return knowsQuestionMapper.insertKnowsQuestion(knowsQuestion);
    }

    /**
     * 修改知识点题目关联
     * 
     * @param knowsQuestion 知识点题目关联
     * @return 结果
     */
    @Override
    public int updateKnowsQuestion(KnowsQuestion knowsQuestion)
    {
        return knowsQuestionMapper.updateKnowsQuestion(knowsQuestion);
    }

    /**
     * 批量删除知识点题目关联
     * 
     * @param kIds 需要删除的知识点题目关联主键
     * @return 结果
     */
    @Override
    public int deleteKnowsQuestionByKIds(Long[] kIds)
    {
        return knowsQuestionMapper.deleteKnowsQuestionByKIds(kIds);
    }

    /**
     * 删除知识点题目关联信息
     * 
     * @param kId 知识点题目关联主键
     * @return 结果
     */
    @Override
    public int deleteKnowsQuestionByKId(Long kId)
    {
        return knowsQuestionMapper.deleteKnowsQuestionByKId(kId);
    }
}
